/*
 * @Author: zhangjun 
 * @Date: 2017-06-06 15:14:10 
 * @Last Modified by: zhangjun
 * @Last Modified time: 2017-06-12 14:13:22
 */
import config from 'assets/js/config';

const apis = {
    // bookSearch: '/book/fuzzy-search',
    // booksDetailes: '/book/', //book/书籍id(_id)
    // allBtoc: '/btoc/', //toc/书源ID?view=chapters
    // chaptersList: '/toc/', //toc/书源ID?view=chapters
    // searchAuthor: '/author-books', //author-books?author=忘语
    
    /**
     * 掘金追书神器接口 api  http://novel.juhe.im        https://github.com/xiadd/zhuishushenqi/blob/master/README.md
     * 
     * params 里面的参数指直接写在url后面
     * query 是get请求
     */

    categories: '/categories/',//获取带书籍数量的父分类
    subCategories: '/sub-categories/',//获取带子分类的分类
    categoryInfo: '/category-info/',//获取分类详情  /category-info?gender=male&type=hot&major=奇幻&minor=&start=0&limit=20
    // query:
    // {
    //   gender, type, major(主分类), minor(子分类), start, limit
    // }
    bookInfo: '/book-info/',//获取书籍详情 book-info/53115e30173bfacb4904897e
    // params:
    // {
    //   id: book id
    // }
    recommend: '/recommend/',//获取书籍相关推荐     /recommend/53115e30173bfacb4904897e
    // query:
    // {
    //   id: 书籍id
    // }
    authorBooks: '/author-books/',//获取作者名下的书籍     /author-books?author=忘语
    // query:
    // {
    //   author: 作者名
    // }
    bookSources: '/book-sources/',//获取书籍源    /book-sources?view=summary&book=567d2cb9ee0e56bc713cb2c0
    // query:
    // {
    //   view: 'summary',
    //   book: {bookid}
    // }
    bookChapters: '/book-chapters/',//获取书籍章节 /book-chapters/56f8da09176d03ac1983f6cd
    //   params:
    // {
    //   id: {书籍源id}
    // }
    //注意这里需要进行url编码
    chapters: '/chapters/',//获取章节详细内容  /chapters/http%3A%2F%2Fvip.zhuishushenqi.com%2Fchapter%2F56f8da09176d03ac1983f6d7%3Fcv%3D1486473051386
    // params:
    // {
    //   link: {目录中的章节link}
    // }
    search: '/search',//获取搜索结果   /search?keyword=遮天
    // query:
    // {
    //   keyword: {书籍关键字}
    // }
    rankCategory: '/rank-category/', //获取排名分类
    rank: '/rank/',//获取排名详情  /rank/54d42d92321052167dfb75e3
    // params:
    // {
    //   id: {排名分类的id}
    // }
};

config.addApis(apis);
// config.setRoot('http://api.zhuishushenqi.com');
config.setCDN('http://novel.juhe.im');

export default config;